<template>
  <div>
    <ul>
      <li v-for="item in newsList" :key="item.id">
        <router-link :to="{ name: 'newsDetail', query: item }">{{
          item.title
        }}</router-link>
      </li>
      <hr />
      <router-view></router-view>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'homeNews',
  data() {
    return {
      newsList: [
        { id: 1, title: '娱乐新闻', content: '某某某' },
        { id: 2, title: '体育新闻', content: 'F1' },
        { id: 3, title: '社会新闻', content: '据专家说' },
      ],
    }
  },
}
</script>

<style></style>
